package com.zhengjiang.cxf.webservice.service.impl;

import com.zhengjiang.cxf.webservice.domain.User;
import com.zhengjiang.cxf.webservice.service.UserService;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class UserServiceImpl implements UserService {

    @Override
    public String getUserName(String name) {
        return "Hello " + name;
    }

    @Override
    public boolean addUser(User user) {
        System.out.println("add User success");
        return true;
    }

    @Override
    public List<User> getAllUser(){
        List<User> list = new ArrayList<>();
        list.add(new User("zhangsan",20,"male"));
        list.add(new User("lisi",21,"male"));
        return list;
    }

}
